package com.alibaba.shopping_admin_service.mapper;

import com.alibaba.shopping_common.pojo.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName RoleMapper.xml
 * @Description TODO
 * @Author Leo
 * @Date 2024/12/6 12:44
 */
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 根据ID查询Role信息
     * @param rid
     * @return
     */
    Role findByID(Long rid);

    // 根据ID删除角色的权限
    void delRolePermission(Long rid);

    // 给角色新增权限
    void addRolePermission(@Param("rid") Long rid, @Param("pid") Long pid);
}




